-
Notifications
You must be signed in to change notification settings - Fork 53
Activity tag support #426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activity tag support #426
Conversation
cgillum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to revisit the public API change. In particular, I don't think we should limit tags to activity calls.
|
@cgillum Hi Chris, all tests passed (tested locally works). |
kaibocai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, Please get @cgillum approval as well!
changes updated, requesting review again
nytian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a integration tests, e.g. in here https://github.com/microsoft/durabletask-dotnet/blob/main/test/Grpc.IntegrationTests/OrchestrationPatterns.cs to simulate calling activity with tags? Just want to make sure this behavior is ensured, as we don't run samples in the CI usually.

This pull request introduces several enhancements and new features to improve the functionality and flexibility of the Durable Task framework. The most significant changes include the addition of tagging support for tasks, the creation of a new activity class for cache clearing, and updates to orchestrator logic to utilize the new activity. Below is a breakdown of the changes:
Related prs:
https://github.com/microsoft/durabletask-protobuf/pull/43/files
https://github.com/Azure/durabletask/pull/1211/files
https://msazure.visualstudio.com/One/_git/AAPT-DTMB/pullrequest/12388270
Task Tagging Support
Tagsproperty to theTaskOptionsclass, enabling tasks to have associated metadata tags. This includes a new constructor for initializingTaskOptionswith tags. (src/Abstractions/TaskOptions.cs, src/Abstractions/TaskOptions.csR22-R42)CallActivityOptionsclass, inheriting fromTaskOptions, specifically for configuring activity calls with tags. (src/Abstractions/TaskOptions.cs, src/Abstractions/TaskOptions.csR128-R153)ProtoUtilsto handle tags during task scheduling and history event conversion, ensuring tags are serialized and deserialized properly. (src/Shared/Grpc/ProtoUtils.cs, [1] [2]TaskOrchestrationContextWrapperto pass tags when scheduling tasks, ensuring they are included in the orchestration execution. (src/Worker/Core/Shims/TaskOrchestrationContextWrapper.cs, src/Worker/Core/Shims/TaskOrchestrationContextWrapper.csR141-R170)New Cache Clearing Activity
CacheClearingActivityclass, which simulates cache clearing and can be invoked as part of an orchestration. (samples/ScheduleWebApp/Activities/CacheClearingActivity.cs, samples/ScheduleWebApp/Activities/CacheClearingActivity.csR1-R17)CacheClearingOrchestratorto call the newCacheClearingActivityusingCallActivityAsyncwith tagging options. (samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestrator.cs, samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestrator.csL17-R23)Integration with Sample Application
CacheClearingActivityand updated the Durable Task worker configuration in the sample application to include the new activity. (samples/ScheduleWebApp/Program.cs, samples/ScheduleWebApp/Program.csR23-L28)usingdirectives for the new activity in the orchestrator and program files. (samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestrator.cs, [1];samples/ScheduleWebApp/Program.cs, [2]Dependency Updates
Microsoft.Azure.DurableTask.Corepackage from version3.1.0to3.1.1to ensure compatibility with the new features. (Directory.Packages.props, Directory.Packages.propsL31-R31)Code Cleanup
usingdirective fromProtoUtils.csto improve code clarity. (src/Shared/Grpc/ProtoUtils.cs, src/Shared/Grpc/ProtoUtils.csL7)all durabletask-dotnet ci tests passed with activity tag changes.
i see the inmemoryorchservice used in integ test do not support getorchestrationhistory so will add the integ tests for this to dts repo.
I built the SDK locally with activity tag support, added the tests in DTMB, and verified that all related tests pass successfully.
i will merge these tests to DTMB Pull request 12627874: portable dotnet sdks version bump + add portable sdk activity tag integration... - Repos
after next portable dotnet sdks release including activity tag.